﻿using System;
using System.Web;

namespace iPhOwa.Exchange
{
	/// <summary>
	/// Extensions methods for the <see cref="Uri"/> class.
	/// </summary>
	public static class UriExtensions
	{
		/// <summary>
		/// Url encode a uri.
		/// </summary>
		/// <param name="uri"></param>
		/// <returns></returns>
		public static string UrlEncode(this Uri uri)
		{
			return HttpUtility.UrlEncode(uri.ToString());
		}
	}
}